﻿<Application
    x:Class="Knihotoc_WP8.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:local="clr-namespace:Knihotoc_WP8.Localization"
    xmlns:settings="clr-namespace:Knihotoc_WP8.Settings"
    xmlns:data="clr-namespace:Knihotoc_WP8.Data"
    xmlns:maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps">

    <!--Application Resources-->
    <Application.Resources>
        <local:LocalizedStrings x:Key="LocalizedStrings" />

        <ControlTemplate x:Key="PushpinCurrentPosition" TargetType="maps:Pushpin">
            <Grid x:Name="ContentGrid" 
                  HorizontalAlignment="Center" 
                  VerticalAlignment="Center">
                <Image x:Name="Layer1"
                       Width="48"
                       Height="48"
                       Margin="-24,0,0,-24"
                       Source="/Images/Pushpins/ic_maps_indicator_current_position2.png"/>
            </Grid>
        </ControlTemplate>

        <ControlTemplate x:Key="PushpinAccuracyEllipse" TargetType="maps:Pushpin">

        </ControlTemplate>

        <ControlTemplate x:Key="PushpinBookFound" TargetType="maps:Pushpin">
            <Grid x:Name="ContentGrid" 
                  HorizontalAlignment="Center" 
                  VerticalAlignment="Center">
                <Image x:Name="Layer1"
                       Width="50"
                       Margin="-25,0,0,0"
                       Source="/Images/Pushpins/pin.book2.green.png"/>
            </Grid>
        </ControlTemplate>

        <ControlTemplate x:Key="PushpinBookNotFound" TargetType="maps:Pushpin">
            <Grid x:Name="ContentGrid" 
                  HorizontalAlignment="Center" 
                  VerticalAlignment="Center">
                <Image x:Name="Layer1"
                       Width="50"
                       Margin="-25,0,0,0"
                       Source="/Images/Pushpins/pin.book2.white.png" />
            </Grid>
        </ControlTemplate>

        <ControlTemplate x:Key="PushpinPlaceCaffee" TargetType="maps:Pushpin">
            <Grid x:Name="ContentGrid" 
                  HorizontalAlignment="Center" 
                  VerticalAlignment="Center">
                <Image x:Name="Layer1"
                       Width="50"
                       Margin="-25,0,0,0"
                       Source="/Images/Pushpins/pin.place.caffee2.white.png"/>
            </Grid>
        </ControlTemplate>
    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService
            Launching="Application_Launching" Closing="Application_Closing"
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>